//
//  PhotoSelectionViewCell.m
//  XPhoto
//
//  Created by baboy on 2019/2/22.
//  Copyright © 2019 baboy. All rights reserved.
//

#import "PhotoSelectionViewCell.h"

@implementation PhotoSelectionViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (void)prepareForReuse{
    [super prepareForReuse];
    self.checkbox.hidden = NO;
    self.checkbox.selected = NO;
    self.imageView.image = nil;
    self.durationLabel.text = nil;
}
- (void)setPhotoAsset:(PhotoAsset *)photoAsset{
    _photoAsset = photoAsset;
    
}
- (IBAction)clickCheckbox:(UIButton*)checkbox{
//    checkbox.selected = !checkbox.selected;
    [self.delegate photoSelectionViewCellDidClickCheckbox:self];
}
- (IBAction)clickPhoto:(UIButton*)checkbox{
    if(self.delegate && [self.delegate respondsToSelector:@selector(photoSelectionViewCellDidClickPhoto:)]){
        [self.delegate photoSelectionViewCellDidClickPhoto:self];
    }
}
@end
